/* Includes */
/* -------- */
#include "HALOutputs.h"
#include "MALioapi.h"


/**************************************************************
 *  Name                 :	Set_HighBeamLights_State
 *  Description          :  Set the state of HighBeamLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_HighBeamLights_State 			(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(HighBeamLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(HighBeamLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_LowBeamLights_State
 *  Description          :  Set the state of LowBeamLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LowBeamLights_State 			(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(LowBeamLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(LowBeamLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_RightFrontParkingLights_State
 *  Description          :  Set the state of ...
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_RightFrontParkingLights_State 	(E_SM_OUTPUTS_ST le_output_cmd)
{

}

/**************************************************************
 *  Name                 :	Set_LeftFrontParkingLights_State
 *  Description          :  Set the state of ...
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LeftFrontParkingLights_State 	(E_SM_OUTPUTS_ST le_output_cmd)
{

}

/**************************************************************
 *  Name                 :	Set_RightRearParkingLights_State
 *  Description          :  Set the state of RightRearParkingLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_RightRearParkingLights_State 	(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(RightRearParkingLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(RightRearParkingLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_LeftRearParkingLights_State
 *  Description          :  Set the state of LeftRearParkingLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LeftRearParkingLights_State 	(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(LeftRearParkingLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(LeftRearParkingLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_ReverseLights_State
 *  Description          :  Set the state of ReverseLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_ReverseLights_State 			(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(ReverseLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(ReverseLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_RightFrontTurnSignal_State
 *  Description          :  Set the state of RightFrontTurnSignal
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_RightFrontTurnSignal_State 	(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_SetPinFctn(RightFrontTurnSignal,PA_GPIO);
			IO_PinWrite(RightFrontTurnSignal,OFF);
			break;
		case ACTIVE:
			IO_SetPinFctn(RightFrontTurnSignal,PA_AM1);	
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_LeftFrontTurnSignal_State
 *  Description          :  Set the state of LeftFrontTurnSignal
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LeftFrontTurnSignal_State 		(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_SetPinFctn(LeftFrontTurnSignal,PA_GPIO);
			IO_PinWrite(LeftFrontTurnSignal,OFF);
			break;
		case ACTIVE:
			IO_SetPinFctn(LeftFrontTurnSignal,PA_AM1);
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_RightRearTurnSignal_State
 *  Description          :  Set the state of RightRearTurnSignal
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_RightRearTurnSignal_State 		(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(RightRearTurnSignal,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(RightRearTurnSignal,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_LeftRearTurnSignal_State
 *  Description          :  Set the state of LeftRearTurnSignal
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LeftRearTurnSignal_State 		(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(LeftRearTurnSignal,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(LeftRearTurnSignal,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_RightStopLights_State
 *  Description          :  Set the state of RightStopLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_RightStopLights_State 			(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(RightStopLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(RightStopLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_LeftStopLights_State
 *  Description          :  Set the state of LeftStopLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LeftStopLights_State 			(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_PinWrite(LeftStopLights,OFF)
			break;
		case ACTIVE:
			IO_PinWrite(LeftStopLights,ON)
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_RightEmergencyLigths_State
 *  Description          :  Set the state of RightEmergencyLigths
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_RightEmergencyLigths_State 	(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_SetPinFctn(RightEmergencyLigths,PA_GPIO);
			IO_PinWrite(RightEmergencyLights,OFF);
			break;
		case ACTIVE:
			IO_SetPinFctn(RightEmergencyLigths,PA_AM1);
			break;
		default:
			// Do nothing
			break;
	}
}

/**************************************************************
 *  Name                 :	Set_LeftEmergencyLights_State
 *  Description          :  Set the state of LeftEmergencyLights
 *  Parameters           :  Inputs: E_SM_OUTPUTS_ST le_output_cmd
 *  Return               :	none
 *  Critical/explanation :  No
 **************************************************************/
void Set_LeftEmergencyLights_State 		(E_SM_OUTPUTS_ST le_output_cmd)
{
	switch(le_output_cmd)
	{
		case INACTIVE:
			IO_SetPinFctn(LeftEmergencyLights,PA_GPIO);
			IO_PinWrite(LeftEmergencyLights,OFF);
			break;
		case ACTIVE:
			IO_SetPinFctn(LeftEmergencyLights,PA_AM1);
			break;
		default:
			// Do nothing
			break;
	}
}